<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('article', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('文章标题');
            $table->string('ctitle')->nullable()->comment('网页页头标题');
            $table->integer('classify')->nullbale()->comment('文章分类');
            $table->string('keywords')->nullable()->comment('关键词');
            $table->text('description')->nullable()->comment('描述');
            $table->longText('content')->nullable()->comment('文章内容');
            $table->string('author')->default('荣智文化')->comment('发布人');
            $table->string('amount')->delault(0)->comment('访问量');
            $table->string('imgurl')->comment('封面图');
            $table->string('link')->nullable()->comment('外部链接');
            $table->integer('top')->nullable()->comment('置顶');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('article');
    }
}
